package org.example.api.user;

import lombok.extern.slf4j.Slf4j;
import org.example.controller.BaseController;
import org.example.controller.CommonResponse;
import org.example.entity.dto.AuthorDTO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Aaron
 * @since 2020/12/25 16:46
 * <p>描述：</p>
 */
@Slf4j
@Service
public class FeignAuthorServiceImpl extends BaseController implements FeignAuthorService {

    @Override
    public CommonResponse<Integer> saveAuthor(AuthorDTO authorDTO) {
        return error("熔断：新增用户失败");
    }

    @Override
    public CommonResponse<Integer> deleteAuthorById(Long userId) {
        return error("熔断：删除用户失败");
    }

    @Override
    public CommonResponse<Integer> updateAuthorById(AuthorDTO authorDTO) {
        return error("熔断：修改用户失败");
    }

    @Override
    public CommonResponse<AuthorDTO> getAuthorById(Long id) {
        return error("熔断：获取用户失败");
    }

    @Override
    public CommonResponse<List<AuthorDTO>> listAuthors(AuthorDTO authorDTO) {
        return error("熔断：查询用户失败");
    }

}
